<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterAvatarToUserext extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //扩大字段长度
        Schema::table('user_ext',function (Blueprint $table){
            $table->string('avatar',255)->change();
            $table->string('home_page',255)->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //还原原来大小
        Schema::table('user_ext',function (Blueprint $table){
            $table->string('avatar',50)->change();
            $table->string('home_page',50)->change();
        });
    }
}
